
<template>
  <el-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </el-config-provider>
</template>

<script setup>
import { onMounted } from 'vue';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const locale = zhCn
</script>

<style>
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

#app {
  height: 100vh;
}

.toggle-sidebar {
  cursor: pointer;
  transition: transform 0.3s;
  padding: 8px;
  border-radius: 4px;
}

.toggle-sidebar:hover {
  background-color: #f5f5f5;
}

.toggle-sidebar.is-active {
  transform: rotate(180deg);
}

.el-dropdown-link {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.username {
  margin: 0 8px;
  color: #606266;
}

.main {
  padding: 20px;
  background-color: #f0f2f5;
}

.main-content {
  margin-top: 20px;
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
}

/* 路由过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* element-plus dark mode overrides */
html.dark {
  --el-bg-color: #1a1a1a;
  --el-bg-color-overlay: #1d1e1f;
}
</style>